#include "nvic.h"

void NVIC_InitConfig(uint8_t Channel, uint8_t PreemptionPriority, uint8_t SubPriority, FunctionalState State)
{    
    NVIC_InitTypeDef NVIC_InitStructure;
	NVIC_InitStructure.NVIC_IRQChannel = Channel;
	NVIC_InitStructure.NVIC_IRQChannelCmd = State;
	NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = PreemptionPriority;
	NVIC_InitStructure.NVIC_IRQChannelSubPriority = SubPriority;
	NVIC_Init(&NVIC_InitStructure);
}
